package com.example.testutil.util;

import android.animation.TypeEvaluator;
import android.graphics.PointF;
/*
 * 自定义贝塞尔曲线的TypeEvaluator
 * create by raymond on 16/11/7
 */

public class BezierTypeEvaluator implements TypeEvaluator<PointF> {

    private PointF mMovePoint;
    public BezierTypeEvaluator( PointF mPointF) {
        super();
        mMovePoint = mPointF;
    }

    @Override
    public PointF evaluate(float fraction, PointF startValue, PointF endValue) {
        return BezierUtil.CalculateBezierPointForQuadratic(fraction, startValue, mMovePoint, endValue);
    }

}
